import { get, post, del, put } from "../utils/request";
//获取用户信息
export const loaduserAPI = () => get("http://192.168.15.6:3006/members/info");

//新增地址
export const addAddressAPI = (data) =>
  post("http://192.168.15.6:3006/members/addresses", data);

//获取地址
export const loadAddressAPI = () =>
  get("http://192.168.15.6:3006/members/addresses");

//删除地址
export const delDIZHIAPI = (id) =>
  del("http://192.168.15.6:3006/members/addresses?id=" + id);

//获取单条数据
export const loadDANTIAOAPI = (id) =>
  get("http://192.168.15.6:3006/members/addresses/" + id);

//修改地址
export const editAPI = (id, data) =>
  put("http://192.168.15.6:3006/members/addresses/" + id, data);

//修改个人信息

export const editgerenAPI = (data) =>
  put("http://192.168.15.6:3006/members/update_info", data);

//修改密码
export const editmimaAPI = (data) =>
  put("http://192.168.15.6:3006/members/modify_password", data);
